<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript">
        function css() {
            if (arguments.length ==2){
               return arguments[0].style[arguments[1]];
            }
            else {
                return arguments[0].style[arguments[1]] = arguments[2]
            }
        }
        window.onload = function () {
            var oDiv = document.getElementById('div1');
            alert(css(oDiv,'height'));
        }
    </script>
</head>
<body>
  <div id="div1" style="width:200px;height: 200px;background: skyblue"></div>
</body>
</html>